package com.yami.shop.multishop.controller;

import com.yami.shop.common.bean.PageDTO;
import com.yami.shop.common.bean.PageVO;
import com.yami.shop.common.response.ServerResponseEntity;
import com.yami.shop.nft.common.service.NftDawService;
import com.yami.shop.nft.common.vo.NftVO;
import com.yami.shop.security.multishop.util.SecurityUtils;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/admin/nftdaw")
@Tag(name = "admin-链上铸币信息")
public class NftDawController {

    @Autowired
    @Lazy
    private NftDawService nftDawServices;

    @GetMapping("/getpageDaw")
    @Operation(summary =  "分页获取链上铸币信息", description = "分页获取链上铸币信息")
    public ServerResponseEntity<PageVO<NftVO>> getpageDaw(PageDTO pageDTO, @Param("nftName")String nftName, @Param("denomId")String denomId) {
        Integer sysType = 1; //店铺端
        Long shopId = SecurityUtils.getShopUser().getShopId();
        return ServerResponseEntity.success(nftDawServices.pageNftDaw(pageDTO,nftName,denomId,sysType,shopId));
    }

}
